Documentation for Users  1.0.2
Perception Toolbox for Virtual Reality (PTVR) Manual
Hand controllers

On each of the two HTC Vive hand controllers, there are 3 possible choices to create Events:

  • the trigger
  • the grip
  • the touch

>

Examples

An Event activated when the user presses the trigger of the right controller is created with the line of code below:

myEvent = PTVR.Data.Event.HandController (validResponses = ['right_trigger'], mode="press")

An Event activated when the user presses the trigger of the left controller is created with the line of code below:

myEvent = PTVR.Data.Event.HandController (validResponses = ['left_trigger'], mode="press")

An Event activated when the user releases the trigger of the left controller is created with the line of code below:

myEvent = PTVR.Data.Event.HandController (validResponses = ['left_trigger'], mode="release")


😱 Warning: Do not confuse the PTVR Hand Controller with a Hand Tracker (the latter does not exist (yet) in PTVR).

Valid arguments for the 'validResponses' parameter'

  • 'right_trigger'
  • 'right_grip'
  • 'right_touch'
  • 'left_trigger'
  • 'left_grip'
  • 'left_touch'

Demos

Python file

Description

hand_controller_Event.py

How to create Events for the hand controllers